<template>
  <div>
    <van-row>
      <van-col span="24" class="back" ><heads/></van-col>
      <van-col span="5" class="back"><left/></van-col>
      <van-col span="3" class="back"><cate :data=data @id=change /></van-col>
      <van-col span="13" class="back">
        <table border="1" width="1000" cellspacing="0">
          <tr align="center">
            <td><input type="checkbox"></td>
            <td>账号</td>
            <td>姓名</td>
            <td>性别</td>
            <td>手机号</td>
            <td>邮箱</td>
            <td>工号</td>
            <td>状态</td>
            <td>操作</td>
          </tr>
          <tr v-for="i in user" :key="i.id">
            <td><input type="checkbox"></td>
            <td>{{i.username}}</td>
            <td>{{i.name}}</td>
            <td>{{i.gender}}</td>
            <td>{{i.mobile}}</td>
            <td>{{i.email}}</td>
            <td>{{i.number}}</td>
            <td>{{i.status}}</td>
            <td></td>
          </tr>
        </table>
      </van-col>
    </van-row>
  </div>
</template>

<script>
import axios from 'axios'
import cate from '../components/cate'
import heads from '../components/heads'
import left from '../components/left'
export default {
  name: "user",
  components:{
    'left':left,
    'heads':heads,
    'cate':cate,
  },
  data(){
    return{
      user:[],
      data:[]
    }
  },
  methods:{
    get_user(){
      axios({url:'getuser',method:'get'}).then(res=>{
        this.user=res.data.list
      })
    },
    get_list(){
      axios({url:"organization",method:'get'}).then(res=>{
        this.data=res.data.list
        this.get_user()
      })
    },
    change(id){
      alert(id)
    },
  },
  mounted() {
    this.get_list()
  }
}
</script>

<style scoped>

</style>